package com.sy.mapper.inventory;

import com.sy.bean.inventory.InventoryConDetail;
import com.sy.bean.inventory.InventoryCont;
import com.sy.common.crud.IMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface InventoryContMapper extends IMapper<InventoryCont> {

    /**
     * 根据id查询盘点单详情
     * @param id
     * @return
     */
    List<InventoryCont> queryDetail(int id);


    /**
     * 新增盘点单
     * @param inventoryCont
     * @return
     */
    int insert(InventoryCont inventoryCont);

    /**
     * 新增盘点单详情
     * @param inventoryConDetailList
     * @return
     */
    int insertDetail(List<InventoryConDetail> inventoryConDetailList);

    /**
     * 删除盘点单
     * @param id
     * @return
     */
    int delete(int id);

    /**
     * 删除盘点单详情
     * @param id
     * @return
     */
    int deleteDetail(int id);

    String queryMaxCode(String year);

}
